package com.hansheng.dao.impl;

import com.hansheng.dao.SemiProductDao;
import com.hansheng.entity.SemiProductEntity;
import com.hansheng.entity.VSemiproductEntity;

import java.util.List;

/**
 * Created by GoldenMan on 2017/5/12.
 */
public class SemiProductDaoImpl implements SemiProductDao {
    private BaseDao baseDao;

    @Override
    public boolean saveSemiProduct(SemiProductEntity semiProductEntity) {
        return baseDao.saveEntity(semiProductEntity);
    }

    @Override
    public List getSemiProductListByOutFormNo(String outFormNo) {
        String whereHql = "where o.outFormNo=?";
        Object[] params = {outFormNo};
        return baseDao.getEntityListByCondition(VSemiproductEntity.class,whereHql, params);
    }

    public void setBaseDao(BaseDao baseDao) {
        this.baseDao = baseDao;
    }
}
